package com.zhny.aiot.hk.security.video.plugin;

import com.zhny.aiot.plugin.ICenterFacilities;
import com.zhny.aiot.plugin.IDevice;
import com.zhny.aiot.plugin.core.plugin.AbstractFactory;
import com.zhny.aiot.plugin.model.DeviceEntity;
import com.zhny.aiot.plugin.model.FactoryType;
import com.zhny.aiot.plugin.model.StoreEntity;
import org.pf4j.Extension;
import org.pf4j.Plugin;
import org.pf4j.PluginWrapper;

public class VideoPlugin extends Plugin {
    public VideoPlugin(PluginWrapper wrapper) {
        super (wrapper);
    }

    @Extension
    public static class VideoFactory extends AbstractFactory<VideoConfig>{

        @Override
        public Class<VideoConfig> configClass() {
            return VideoConfig.class;
        }

        @Override
        public IDevice createDevice(ICenterFacilities iCenterFacilities, DeviceEntity deviceEntity) {
            return new VideoDevice (this,iCenterFacilities,deviceEntity);
        }

        @Override
        public Class<? extends StoreEntity> storeClass() {
            return VideoStore.class;
        }

        @Override
        public String getId() {
            return "hk-security-video-plugin";
        }

        @Override
        public String getName() {
            return "海康安防监控摄像头";
        }

        @Override
        public FactoryType getType() {
            return FactoryType.Video;
        }
    }
}
